package date1206;

import java.sql.SQLException;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lu.jdog.util.Resource;

import date1206.bean.impl.HelloImpl;

/**
 * @author Yue
 * @date 2017年12月6日 下午5:33:52
 */
public class SpringTest {
	private static AbstractApplicationContext applicationContext;

	public static void main(String[] args) throws SQLException {
		applicationContext = new ClassPathXmlApplicationContext(
				Resource.getAssertPath(SpringTest.class, "beans.xml"));
		
//		Chinese chinese = applicationContext.getBean("chinese",Chinese.class);
//		chinese.eat("xxx");
		
		
		HelloImpl hello = applicationContext.getBean("helloImpl" , HelloImpl.class);
		hello.foo();
//		System.out.println(hello.getClass());
////		hello.addUser("孙悟空" , "7788");
//		World world = applicationContext.getBean("world" , World.class);
//		world.bar();
		
	}
}